package site.yunnong.atvris.service.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author zjh
 * @date 2021/9/26 16:24
 */
@Data
@Document(indexName = "atvris", shards = 1, replicas = 0)
public class EsVideo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private Long id;
    
    private Long uuid;
    @Field(analyzer = "ik_max_word", type = FieldType.Text, searchAnalyzer = "ik_smart")
    private String userNickname;
    private Long pid;
    @Field(analyzer = "ik_max_word", type = FieldType.Text, searchAnalyzer = "ik_smart")
    private String partitionName;
    private String cover;
    @Field(analyzer = "ik_max_word", type = FieldType.Text, searchAnalyzer = "ik_smart")
    private String title;
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime uploadTime;
    @ApiModelProperty("视频时长")
    private Long videoTime;
    @ApiModelProperty("视频分级")
    private Integer level;
    
    private Integer clickCount;
    
    private Integer viewCount;
    
    private Integer starCount;
    
    private Integer likedCount;
    
    private Integer commentCount;
    
    private Integer shareCount;
    
    private Double score;
}
